import { ILoadMapTypeAll } from '@/common';
import { getBaseUrl } from '@/services/urlconst';
import { getCompanyID, getLevelFirst, getLevelZero, getTenantID, getUserDepID, getUserID, ntkoPageUrlParams } from '@/utils';

/**
 * 合同统计列表管理权限
 * @param curRes
 * @returns
 */
const getManageTabSwitch = (curRes: Record<string, any>) => {
  if (curRes?.['/contractController/all']) {
    return {
      params: 'all',
    };
  } else if (curRes?.['/contractController/ownCompanyID']) {
    return {
      ownCompanyID: getLevelZero(),
      // ownCompanyID: getCompanyID(),
      params: 'ownCompanyID',
    };
  } else if (curRes?.['/contractController/ownDepartmentID']) {
    return {
      ownDepartmentID: getLevelFirst(),
      // ownDepartmentID: getUserDepID(),
      params: 'ownDepartmentID',
    };
  } else if (curRes?.['/contractController/ownerID']) {
    return {
      ownerID: getUserID(),
      params: 'ownerID',
    };
  }
  return {};
};

export { getManageTabSwitch };
